feat: add agents/ YAML configs and top-level env field#47
Merged
Conversation
Phase 2 foundation: adds the agent config package that replaces profile.toml with a declarative YAML format. The payload renderer generates self-contained payload directories (env.sh, run.sh, bin/, task.md) uploaded to sandboxes. New: - internal/agent: AgentConfig struct, Parse/ParseFile, BuildEnvSh, BuildRunSh, RenderPayload with path traversal protection on include: paths - go.work: Go workspace linking root module and sandbox/launcher module, enabling the launcher to import internal/ packages in follow-up PRs - 18 tests covering parser validation, env generation, run.sh template, payload rendering, and security edge cases Also: - providers.toml: change gws type from custom to openshell (matches reality after GWS native provider in PR 44)
d43ec6c to
0217890
Compare
Converts profiles/default.toml and profiles/ci.toml to the new agent.yaml format under agents/. Adds a top-level env field to AgentConfig for non- provider env vars (inference proxy config, Claude Code settings). Provider config overrides top-level env when keys collide. New files: - agents/default.yaml: full agent config with all providers + proxy env - agents/ci.yaml: minimal CI config with no providers Changes: - AgentConfig.Env field (map[string]string) merged into BuildEnvSh output - 3 new tests: top-level env, provider override, ParseFile roundtrip
0217890 to
ddfeb60
Compare
Adds test/kind-lifecycle.sh that manages the full kind cluster lifecycle: create cluster, run tests, delete cluster. Uses an isolated temp kubeconfig so it never touches your OCP/cloud kubectl context. Simplifies validate-kind Makefile targets to use the lifecycle script. Adds validate-kind-keep target for debugging (keeps cluster after tests). Tested: 10/10 kind CI, OCP context undisturbed throughout.
Replaces 15+ overlapping Makefile test targets with a clear structure: CI targets (no creds, GHA-safe): make ci - unit + bats + lint make ci-local - ci + local gateway integration make ci-kind - ci + kind (self-contained cluster) Developer targets (creds available): make dev-test-local - pre-commit: unit + bats + local full + ci make dev-test-kind - kind with self-contained lifecycle make dev-test-remote - OCP: needs KUBECONFIG make dev-test-all - all of the above Updates integration.yml to use make ci-local and make ci-kind instead of calling test-flow.sh directly. CI and local dev now use the same entry points. Tested: make ci passes, make dev-test-local passes (24/24 + 14/14).
make ci now includes bats tests, which requires bats on the runner. The ubuntu-latest image doesn't have bats pre-installed.
Both clusters can't pull from private ghcr.io. Dev targets now build dev images to quay.io first and pass SANDBOX_IMAGE/LAUNCHER_IMAGE overrides to the test flows.
Kind clusters with cold image caches need extra time to pull the supervisor init container. 60s was too tight -- bump to 120s.
On GHA, openshell is installed via deb package to /usr/bin/openshell. The test restricts PATH to simulate a missing CLI, but can't exclude /usr/bin without breaking everything else. Skip when openshell is at a system path we can't exclude.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context
Stacked on #46. Part of Phase 2 profile migration. The profiles/ directory removal and code reference updates will come in a follow-up once the agent parser is wired into harness up/create.
Test plan